package tech.aistar.corejava.day06;

import tech.aistar.corejava.day05.Clazz;
import tech.aistar.corejava.day05.Student;

import java.util.Arrays;

/**
 * @author success
 * @version 1.0
 * @description:本类用来演示:
 * @date 2019/7/22 0022
 */
public class TestStudent {
    public static void main(String[] args) {
        //如何设置自定义属性
        Student s = new Student();
        s.setId(1);
        s.setSname("tom");

        //数组类型private String[] hobbies;
        //        private String sname;

        //创建一个数组对象
        //String sname = "tom";
        //s.setSame(sname);
        String[] hobbies = {"爱睡觉","爱打瞌睡","爱熬夜"};
        s.setHobbies(hobbies);

        System.out.println(Arrays.toString(s.getHobbies()));

       // System.out.println(s.toString());

        //对自定义的Clazz设置值
        //private Clazz clazz;
        //创建一个Clazz对象
        Clazz c = new Clazz(1,"J05",45);
        s.setClazz(c);

        System.out.println(s);

    }
}
